import Cookies from 'js-cookie'

const TokenKey = 'hrsaas-86-token'
const ThemeKey = 'hrsaas-86-theme'
// 获取token
export function getToken() {
  return Cookies.get(TokenKey)
  //  localStorage.getItem(key)
}

// 存储token
export function setToken(token) {
  return Cookies.set(TokenKey, token)
  // localStorage.setItem(k,v)
}
// 移除token
export function removeToken() {
  return Cookies.remove(TokenKey)
  // localStorage.removeItem(k)
}

// 获取theme主题色
export function getTheme() {
  return Cookies.get(ThemeKey)
}
// 存储theme主题色
export function setTheme(val) {
  return Cookies.set(ThemeKey, val)
}
// 移除theme主题色
export function removeTheme() {
  return Cookies.remove(ThemeKey)
}
